convert byte array to hexadecimal string and vice versa